/**
 * Copyright (c) 2020 Coder League
 * All rights reserved.
 *
 * File：UserSession.java
 * History:
 *         2020年12月18日: Initially created, Chrise.
 */
package club.coderleague.cfss.domain.beans;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import club.coderleague.data.jpa.domain.User;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 用户会话。
 * @author Chrise
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UserSession implements User<Long> {
	private static final long serialVersionUID = 2709767200403398454L;
	
	private Long userid;
	private Integer usergroup;
	private String password;
	private Long orgid;
	private String orgname;
	private Integer usertype;
	private String username;
	private String userphone;
	private String loginname;
	private String openid;
	
	/**
	 * @see club.coderleague.data.jpa.domain.User#getId()
	 */
	@Override
	public Long getId() {
		return this.userid;
	}
	
	/**
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
}
